package com.wing.order.model.response;

import com.wing.order.model.entity.OrderReceiveLoad;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 上货明细VO
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class OrderReceiveLoadDetailVO {

    /**
     * ID
     */
    private Long id;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime createTime;

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 上货id
     */
    private Long loadId;

    /**
     * 上货数量
     */
    private Integer quantity;

    /**
     * 柜子编码
     */
    private String cabCode;

    /**
     * 货道编号
     */
    private String spaceCode;

    /**
     * skuCode
     */
    private String skuCode;

    /**
     * 柜子id
     */
    private Long cabId;

    /**
     * 货道id
     */
    private Long spaceId;

    /**
     * sku id
     */
    private String skuId;

    private String skuName;

    private String skuSpec;

    private String skuSpecOld;

    private String skuCodeOld;

    private String skuPic;

    private BigDecimal marketPrice;

    private String productTypeName;

    private String productCategoryName;

    private String productBrandName;

    private String unitName;

    private String enterpriseCode;

    private String code;

    private OrderReceiveLoad.Type type;

    private String departmentName;

    private String roleName;

    private String typeDesc;

    public String getTypeDesc(){
        if (this.type!=null){
            return this.type.getDesc();
        }
        return "";
    }

    private String cabName;

    private Integer quantityPack;

    private Integer quantityPackUnit;

    private Long packId;


    private String packName;
    /**
     * 产品基础单位
     */
    private String basicsUnitName;

    private Long departmentId;

    private String costCenter;

}
